
#静态库
libmycomp.a:comp.o code.o
	@ar -rc $@ $^
	@echo "build $^ to $@ ... done"

%.o:%.c
	@gcc -c $<
	@echo "compling $< to $@ ... done"

.PHONY:clean
clean:
	@rm -rf *.a *.o mycomp*
	@echo "clean ... done"

.PHONY:output
output:
	@mkdir -p mycomp/include
	@mkdir -p mycomp/lib
	@cp -f *.h mycomp/include
	@cp -f *.a mycomp/lib
	@zip -rv ./mycomp.zip ./mycomp
	@echo "output comp ... done"


